<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML>
<html>
  <head> 
	<%@ include file="/platform/style.jsp"%>
	<style>
		
	</style>
	<script>
	function add(){
		window.parent.$w.openDialog({url:ctx+'/information/InformationPage@smsinfoShow.page',title:"添加短信推送",w:600,h:300,afterClose:function(re){
			if(re){
				$w.execForm()
			}
		}});
	}
	
	function del(id){
		window.parent.$w.confirmMsg("确定删除？", function(r){
			if(r){
				$w.doUrl(ctx+"/information/InformationPage@smsinfoDel.page?bean.id="+id,{},function(json){
					$w.execForm()
				})
			}
		})
	}
	
	</script>
  </head>
  
  <body class="easyui-layout">
	<div data-options="region:'center'" class="bodybg">
		<!-- 查询区域 -->
		<form id="queryForm" action="/information/InformationPage@smsinfos.page" method="post">
		<w:hidden bind="pageNum"/>
		<w:hidden bind="pageSize_"/>
		<div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
			<a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="add()">添加短信推送</a>
		</div>
		<div class="ui_line" style="margin-top:10px"></div>
		<!-- 数据列表区域 -->
			<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:true,
																								pageNum:<w:write bind="pageNum"/>,
																								pageSize:<w:write bind="pageSize_"/>,
																								total:<w:write bind="pagination.totalCount"/>,form:'dataForm'">
				<thead>
					<tr class="ui_th">
						<td width="30">ID</td>
						<td>推送内容</td>
						<td>时间</td>
						<td>客户等级</td>
						<td width="80" align="center">操作</td>
					</tr>
				</thead>
				<tbody>
				<w:iterate id="info" bind="resultList_">
					<tr class="ui_td">
						<td><w:write bind="#info.id"/></td>
						<td><w:write bind="#info.content"/></td>
						<td><w:write bind="#info.create_time" format="yyyy-MM-dd"/></td>
						<td><w:equal value="" bind="#info.grade">全部</w:equal><w:write bind="#info.grade" dict="UserGrade"/></td>
						<td align="center">
							<a href="javascript:void(0);" class="ui_btn_2" onclick="del(<w:write bind="#info.id"/>)">删除</a>
						</td>
					</tr>
				</w:iterate>
				<w:switch><w:case bind="resultList_.size()==0"><tr class="ui_td"><td colspan="12">没有短信推送消息记录！</td></tr></w:case></w:switch>
				</tbody>
			</table>
		</form>
	</div>
  </body>
</html>
